// 继承
// 父类
var Animal = {
    createNew:function(){
        var animal={};
        animal.sleep=function(){
            console.log('睡觉觉');
        }
        return animal;
    }
}
var Cat={
    createNew:function(){
        var cat= Animal.createNew();
        cat.name=name;
        var sound= '喵喵喵';// 私有
        cat.makesound=function(){
            console.log(sound);
        }
        return cat;
    }
}

var tom = Cat.createNew('Tom');
console.log(tom.name);// public private protect static
// console.log(tom.sound);// private
tom.makesound();
tom.sleep();
